#include "SoundRessource.hpp"

SoundRessource::SoundRessource(std::string filename) :AbstractRessource<sf::SoundBuffer>(filename)
{
}

SoundRessource::~SoundRessource()
{
	UnloadRessource();
}

void SoundRessource::LoadRessource()
{
	if(m_loaded == false)
	{
		m_ressource = new sf::SoundBuffer;
		m_loaded = m_ressource->LoadFromFile(m_filename);
	}
}

void SoundRessource::UnloadRessource()
{
	delete m_ressource;
	m_ressource = NULL;
	m_loaded = false;
}